using System.ComponentModel;
using System.ComponentModel.Design;

namespace Microsoft.WowAddonStudio.FrameXml.Editor.Test.Mocks
{
	/// <summary>
	/// Provides an mock object to add and remove the event handlers for events that add,
	///  change, remove or rename components, and provides methods to raise 
	/// a System.ComponentModel.Design.IComponentChangeService.ComponentChanged or 
	/// System.ComponentModel.Design.IComponentChangeService.ComponentChanging event.
	/// </summary>
	public class MockComponentChangeService : IComponentChangeService
	{
		#region IComponentChangeService Members

#pragma warning disable 67 // Disable warning CS0067: The event '...' is never used

        /// <summary>
		/// Occurs when a component has been added.
		/// </summary>
		public event ComponentEventHandler ComponentAdded;
		/// <summary>
		/// Occurs when a component is in the process of being added.
		/// </summary>
		public event ComponentEventHandler ComponentAdding;
		/// <summary>
		/// Occurs when a component has been changed.
		/// </summary>
		public event ComponentChangedEventHandler ComponentChanged;
		/// <summary>
		/// Occurs when a component is in the process of being changed.
		/// </summary>
		public event ComponentChangingEventHandler ComponentChanging;
		/// <summary>
		/// Occurs when a component has been removed.
		/// </summary>
		public event ComponentEventHandler ComponentRemoved;
		/// <summary>
		/// Occurs when a component is in the process of being removed.
		/// </summary>
		public event ComponentEventHandler ComponentRemoving;
		/// <summary>
		/// Occurs when a component is renamed.
		/// </summary>
		public event ComponentRenameEventHandler ComponentRename;

#pragma warning restore 67

        /// <summary>
		/// Announces to the component change service that a particular component has changed.
		/// </summary>
		/// <param name="component">The component that has changed.</param>
		/// <param name="member">The member that has changed. This is null if this change is not related to a single member.</param>
		/// <param name="oldValue">The old value of the member. This is valid only if the member is not null.</param>
		/// <param name="newValue">The new value of the member. This is valid only if the member is not null.</param>
		public void OnComponentChanged(object component, MemberDescriptor member, object oldValue, object newValue)
		{
			
		}

		/// <summary>
		/// Announces to the component change service that a particular component is changing.
		/// </summary>
		/// <param name="component">The component that is about to change.</param>
		/// <param name="member">The member that is changing. This is null if this change is not related to a single member.</param>
		public void OnComponentChanging(object component, MemberDescriptor member)
		{
			
		}

		#endregion
	}
}